package com.lirh.mysql.advice;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyExpection {

    @ExceptionHandler(Exception.class)
    public String test(Exception e){
        System.out.println(e);
        return "异常了";
    }
}
